Creating application in ST

How to create a →POU (a →program, a →function block, a →class or a →function), an →interface or a →data type in →ST:

  1. Select a folder of the →project in which you want to create the ST-object.

  2. In menu File or from the context menu of the folder, select New and the command ST-Object.
    Alternative: Select the command ST ProgramST Function Block, ST Function or Data type so that the created ST-object already contains a predefined ST-syntax for the respective ST language element.

  3. In the dialog:

    1. Enter a name under File name.
      (info) If possible, do not enter invalid characters (e.g. umlauts, blanks, the character –, numbers at the start) because the file name is automatically used as POU-name and this POU-name must be a valid →IEC-identifier. But if you need such invalid characters in the file name, delete or replace the invalid characters in POU name before you click Finish.
      It is possible to change the POU-name at any time later. 

    2. Only provided when selecting the commands ST ProgramST Function BlockST Class, ST Function or Data type and if necessary: Enter a →namespace under Namespace name. The text must be an →IEC-identifier or a fully qualified name.
      A fully qualified name consists of a sequence of namespace identifiers separated by . (dots). 
      It is also possible to enter/change a namespace later on within the editor. If the field already contains a namespace and you are not able to change the namespace, it is likely that you are creating the object within a namespace folder (in this case the namespace is determined by the namespace folder).

  4. Afterwards click Finish.
    Result: The project explorer displays the created ST-object (with icon ).  The ST-editor is opened for this object.

  5. Start to enter the ST-code in the editor.
    Use the numerous features and actions provided by Neuron Power Engineer to create the ST-code. For instance, the content assist and the highlighting of errors are supporting you in creating your application in ST correctly and quickly.

    Neuron Power Engineer supports the declaration of several elements within an ST-object.
    The sub-level of the ST-object displays one icon per element to identify the declaration type of the element. Examples:  = program,  = function block, = class,  = function 

  6. Save the ST-code.

    No check of invalid connections

    For some blocks, invalid connections are not checked by Neuron Power Engineer. Therefore, enter code in your application to detect invalid connections (e.g. IF-statements in the ST-code). Example: An invalid connection occurs during a calculation using a standard block. Giving you a specific example: Calculating -250.5 by means of the EXPT-block is an invalid connection.
    Invalid connections of blocks that are checked by Neuron Power Engineer are listed in the description of the corresponding block.

    See "Standard blocks for the application" for information what the consequences of an invalid connection might be.

    Moreover, observe the effects of the compiler settings on the accuracy and behavior of mathematical functions.

  7. Edit and save the ST-code as necessary.